package model.ability;

import model.core.Logger;
import model.entity.Entity;

/**
 * Class defining BindWounds ability used through the interaction 
 * menu.
 * @author Zachary
 */
public class BindWounds extends InteractiveAbility {

	/**
	 * Constructor for BindWounds.
	 * @param name
	 * @param ps
	 * @param mana
	 * @param delay
	 */
	public BindWounds(String name, PassiveSkill ps, int mana, int delay) {
		super(name, ps, mana, delay);
	}

	/**
	 * BindWounds interaction.  
	 */
	public void interactWithTarget(Entity caster, Entity target) {
		if(this.testProbability())
			this.healTarget(target);
		else
			Logger.getInstance().writeToLogger("Ability failed!");
	}
	
	/**
	 * Heal target 3 x PassiveSkillLevelMultiplier.
	 */
	public void healTarget(Entity target){
		int healFactor = (int)(this.getSkillLevelMultiplier() * 3);
		target.heal(healFactor);
	}
}
